package ru.nagakhl.whirlpool.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * If field requires some custom serialization instead of default then it can be marked
 * with this annotation, passing fully qualified class name or Class object for serializer.
 * 
 * Serializer must implement ru.nagakhl.whirlpool.Serializer interface.
 * 
 * One of parameters must present when using this annotation. If both parameters are given, then cls is used.
 * 
 * @author nagakhl
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Serializer {
	
	/** Class of Serializer to use for this field */
	Class<?> cls();
	
	/** Fully qualified class name of Serializer to use for this field */
	String className();
}
